package com.sojson.project.sys.authc.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sojson.result.Result;
import com.sojson.util.token.TokenUtil;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 认证Controller
 * 
 * @author liu
 * @date 2021-03-16
 */
@Api(tags = "认证管理")
@RestController
@RequestMapping("/sys/authc")
public class AuthcController {

    /**
     * 退出登录
     * 
     * @return
     * @throws Exception
     */
    @GetMapping("/logout")
    @ApiOperation("退出登录")
    public Result<Boolean> logout() throws Exception {
        TokenUtil.logout();

        // 返回结果
        return Result.success();
    }

}